/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Marcio
 */
@Embeddable
public class SgufPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "SIGLAUF")
    private String siglauf;
    @Basic(optional = false)
    @Column(name = "CODPAIS")
    private short codpais;

    public SgufPK() {
    }

    public SgufPK(String siglauf, short codpais) {
        this.siglauf = siglauf;
        this.codpais = codpais;
    }

    public String getSiglauf() {
        return siglauf;
    }

    public void setSiglauf(String siglauf) {
        this.siglauf = siglauf;
    }

    public short getCodpais() {
        return codpais;
    }

    public void setCodpais(short codpais) {
        this.codpais = codpais;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (siglauf != null ? siglauf.hashCode() : 0);
        hash += (int) codpais;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SgufPK)) {
            return false;
        }
        SgufPK other = (SgufPK) object;
        if ((this.siglauf == null && other.siglauf != null) || (this.siglauf != null && !this.siglauf.equals(other.siglauf))) {
            return false;
        }
        if (this.codpais != other.codpais) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.SgufPK[ siglauf=" + siglauf + ", codpais=" + codpais + " ]";
    }
    
}
